<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('标题')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('淘宝链接')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="taobaolink" class="form-control" name="row[taobaolink]" type="text" value="{$row.taobaolink}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-cate_id" class="control-label col-xs-12 col-sm-2">{:__('分类')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-cate_id" data-rule="required" class="form-control selectpicker" name="row[cate_id]">
                <option value="0">选择分类</option>
                {foreach name="parentList" item="vo"}
                <option value="{$key}" {in name="key" value="$row['cate_id']"}selected{/in}>{$vo.name}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('封面图片')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-cover" readonly data-rule="required" class="form-control" size="50" name="row[cover]" type="text" value="{$row.cover}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-cover" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-cover"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-cover" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-cover"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-cover"></ul>
        </div>
    </div>

    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('选择教师')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-subject_id" data-rule="required"  class="form-control selectpicker" name="row[teacher_id]">
                {foreach name="teacherList" item="vo"}
                <option value="{$vo['id']}" {if condition="$row['teacher_id'] eq $vo['id']"}selected="true"{/if}>{$vo['name']}</option>
                {/foreach}
            </select>
        </div>
    </div> -->

    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('价格')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" class="form-control" name="row[price]" type="number" value="{$row['price']}" min="0">
        </div>
    </div>-->

    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('VIP价格')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-vip_price" data-rule="required" class="form-control" name="row[vip_price]" type="number"  value="{$row['vip_price']}" min="0">
        </div>
    </div> -->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('介绍')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">是否推荐:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_hot]', ['1'=>__('Yes'), '0'=>__('No')],$row['is_hot'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">是否上架:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>__('Yes'), '0'=>__('No')],$row['status'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">需要购买:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_buy]', ['1'=>__('Yes'), '0'=>__('No')],$row['is_buy'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('排序')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" value="{$row['weigh']}" type="number" min="0">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
